#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include "dominion.h"

void testing(struct gameState* game);
void init(struct gameState *game);
void check(char *foo, int bar, int ans);

int main(int argc, char *argv[]){
	struct gameState *game = malloc(sizeof(struct gameState));

	init(game);

	testing(game);

	free(game);

	return 0;
}

void testing(struct gameState* game){
	game->numActions = 2;

	int position = 2;
	
	check("numActions", 2, game->numActions);

	cardEffect(village, 0, 0, 0, game, position, 0);

	check("numActions", 4, game->numActions);

	cardEffect(village, 0, 0, 0, game, position, 0);

	check("numActions", 6, game->numActions);

	printf("TESTS COMPLETE....................\n");

	return;
}

void init(struct gameState *game){
	int random = rand() % (INT_MAX - 1) +1;
	int *l = malloc(sizeof(int) * 10);
	l = kingdomCards(0,1, 2, 3, 4, 5, 6, 7, 8, 9);
	initializeGame(3, l, random, game);

	return; 
}

void check(char *foo, int bar, int ans){
	if(bar == ans){
		printf("%s PASSED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}
	else{
		printf("%s FAILED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}
}










